#pragma once 

#include <IDK.hpp>

class TCamera : public TObject, virtual public IDK::IRenderable
{
	IDKClass;
protected:
	Math::Matrix44 mView;
	Math::Matrix44 mProj;
	//helper
	Math::Matrix44 mViewProj;
	Math::Matrix44 mInvViewProj;
	Math::Matrix44 mInvView;
	TCamera(){} // is abstract class
private:
	void UpdateHelpers();
public:
	virtual bool Render(IDK::IRenderState& rndState);
	virtual void Rendered(IDK::IRenderState& rndState);
public:
	virtual void Update();
public:
	const Math::Vector3 GetAbsolutePosition(void) const;

	const Math::Ray GetRayFromViewport(const Math::Vector2& xy) const;
};

typedef ref<TCamera> Camera;